package org.ziyuandagong.account.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.ziyuandagong.account.entity.User;
import org.ziyuandagong.account.service.IUserService;
import org.ziyuandagong.commons.result.R;


/**
 * <p>
 * 用户表（t_user），存储系统用户信息 前端控制器
 * </p>
 *
 * @author 自愿打工
 * @since 2024-12-06
 */
@RestController
@RequestMapping("/ziyuandagong/account")
@Api(tags = "用户相关接口",description = "提供用户相关的Rest API")
public class UserController {
    @Autowired
    IUserService userService;
    @ApiOperation("用户注册接口")
    @PostMapping(value = "/register")
    public boolean register(@RequestBody User user){
        return true;
    }
    @ApiOperation("用户登录接口")
    @PostMapping(value = "/login")
    public boolean login(@RequestBody User user){
        return true;
    }
    @ApiOperation("获取用户接口")
    @PostMapping(value = "/{id}")
    public boolean user(@PathVariable @ApiParam(name = "id",value = "讲师ID",required = true) String id){
        return true;
    }
    @ApiOperation("修改用户接口")
    @PostMapping(value = "/update")
    public boolean update(@RequestBody User user){
        return true;
    }
    @ApiOperation("删除用户接口")
    @PostMapping(value = "/delete")
    public boolean delete(@RequestBody User user){
        return true;
    }
    @ApiOperation("查询所有用户接口")
    @GetMapping
    public R list(){
        return R.ok();
    }
}
